package com.example.aop;

import java.lang.reflect.Method;
import java.util.Arrays;

/**
 * @author yanzhao
 * @date 2022/6/6 16:42
 * @since 1.0.0
 */
public class MyThrowsAdvice implements ThrowsAdvice {

    public void afterThrowing(Method method, Object[] args, Object target, Exception e) {
        System.out.printf("[ThrowsAdvice] Method : %s , args : %s , target : %s, exception : %s\n",
                method,
                Arrays.asList(args),
                target,
                e
        );
    }
}
